from pages.exam_page import ExamPage


class ExamOper:
    def __init__(self, driver):
        self.page = ExamPage(driver)

    def get_questions(self):
        elems = self.page.find_questions()
        return elems

    def get_title(self, elem):
        elem = self.page.find_title(elem)
        return elem

    def get_options(self, elem):
        elems = self.page.find_options(elem)
        return elems

    def get_answer(self, elem):
        elem = self.page.find_answer(elem)
        return elem

    def click_submit(self):
        self.page.find_submit().click()

    def click_exam_again(self):
        self.page.find_exam_again().click()

    def click_confirm(self):
        self.page.find_confirm().click()
